package com.ruoyan.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyan.mapper.EmployeeMapper;
import com.ruoyan.pojo.Employee;
import com.ruoyan.service.EmployManageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Package: com.ruoyan.service
 * @ClassName: EmployManageServiceImpl
 * @Author: ruoyan1998
 * @CreateTime: 2021/5/16 14:56
 * @Description:
 */
@Service
public class EmployManageServiceImpl implements EmployManageService
{
    @Resource
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> queryEmployeeList()
    {
        return employeeMapper.queryEmployeeList();
    }

    @Override
    public List<Employee> queryEmployeeByDid(int did)
    {
        return employeeMapper.queryEmployeeByDid(did);
    }

    @Override
    public Employee queryEmployeeByIdAndDid(int id, int did)
    {
        return employeeMapper.queryEmployeeByIdAndDid(id,did);
    }


    @Override
    public int addEmployee(Employee employee)
    {
        return employeeMapper.addEmployee(employee);
    }

    @Override
    public Employee queryEmployeeById(int id)
    {
        return employeeMapper.queryEmployeeById(id);
    }

    @Override
    public int updateEmployee(Employee employee)
    {
        return employeeMapper.updateEmployee(employee);
    }

    @Override
    public int deleteEmployee(int id)
    {
        return employeeMapper.deleteEmployee(id);
    }

}
